import request from '@/utils/request/index.js'
export default {
	/**保存浏览
	 * @param {Object} userId
	 * @param {Object} videoId
	 */
	browseHistory(userId,videoId){
		return request.request({
			url: '/h5/nocyxbrowse/save',
			method : 'put',
			data:{
				userId:userId,
				type:8,
				businessId:videoId,
			}
		})
	},
	/**获取视频详情与当前登录人互动信息
	 * @param {Object} videoId
	 */
	getVideoInfoByLogin(videoId){
		return request.request({
			url: '/h5/nocvideo/mainVideo/' + videoId,
			method : 'get',
		})
	},
	getVideoList(limit,tagList){
		return request.request({
			url: '/h5/nocvideo/likeVidlist',
			method : 'post',
			data:{
				page:1,
				limit:limit,
				tagIds:tagList
			}
		})
	},
	/**点赞、点踩、收藏视频
	 * @param {Object} userId
	 * @param {Object} type
	 * @param {Object} videoId
	 */
	saveCollect(userId,type,videoId){
		return request.request({
			url: '/h5/nocyxcollect/save',
			method : 'post',
			data:{
				userId: userId,
				type: type,
				businessId:videoId,
			}
		})
	},
	/**取消点赞、点踩、收藏视频
	 * @param {Object} likeId
	 */
	cancelCollect(likeId){
		return request.request({
			url: '/h5/nocyxcollect/cancelCollection',
			method : 'post',
			data:{
				collectionId:likeId,
			}
		})
	},
	/**回复评论
	 * @param {Object} replyData
	 */
	replyVideoCommnet(replyData){
		return request.request({
			url: '/h5/nocreply/replyVideoComment',
			method : 'post',
			data:replyData
		})
	},

}
